package com.jinlejia.erp.ui.house;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;

import com.jinlejia.erp.R;
import com.jinlejia.erp.databinding.ActivityAddDistrictBinding;

/**
 * 添加小区
 */
public class AddDistrictActivity extends AppCompatActivity {

    private ActivityAddDistrictBinding binding;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = DataBindingUtil.setContentView(this,R.layout.activity_add_district);
        binding.searchText.setOnClickListener(this::onClick);
        binding.btBack.setOnClickListener(this::onClick);
    }


    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.search_text:
                Intent intent = new Intent(this,SearchDistrictActivity.class);
                intent.putExtra("csCode",getIntent().getStringExtra("csCode"));
                intent.putExtra("type",getIntent().getStringExtra("type"));
                startActivity(intent);
                break;
            case R.id.bt_back:
                finish();
                break;
        }
    }
}
